local skel = fk.CreateSkill {
  name = "lb_zero__mengyao_dulahan",
  tags = { Skill.Compulsory },
  max_branches_use_time = {
    ["round"] = {
      [Player.HistoryRound] = 1,
    }
  }
}

Fk:loadTranslationTable {
  ["lb_zero__mengyao_dulahan"] = "杜拉罕",
  [":lb_zero__mengyao_dulahan"] = "<b>锁定技</b>，每轮限一次，当你成为【杀】的目标后，此【杀】使用者选择弃置两张牌或令此【杀】无效。",

  ["#lb_zero__mengyao_dulahan"] = "杜拉罕：你可以弃置两张牌，或取消后令 %arg 无效",

  ["$lb_zero__mengyao_dulahan1"] = "",
  ["$lb_zero__mengyao_dulahan2"] = "",
}


skel:addEffect(fk.TargetConfirmed, {
  can_trigger = function(self, event, target, player, data)
    return target == player and player:hasSkill(skel.name) and data.card.trueName == "slash" 
    and data.from and data.from:isAlive()
    and player:usedSkillTimes(skel.name, Player.HistoryRound, "round") == 0
  end,
  on_use = function(self, event, target, player, data)
    player:addSkillBranchUseHistory(skel.name, "round")
    if #player.room:askToDiscard(data.from, {
      min_num = 2,
      max_num = 2,
      skill_name = skel.name,
      include_equip = true,
      prompt = "#lb_zero__mengyao_dulahan:::" .. data.card:toLogString()
    }) < 2 then
      data:setNullified(player.room.players)
    end
  end,
})

return skel
